






<?php
require_once 'data/functions.php';
$path = 'txt/films.txt';


$full_path = realpath($path);
$films = mreadFile($path);
?>











<?php foreach ($films as $items ):?>

 <?php 
 $a = trim($items,"\t\r\n "); 
    $film = explode(";", $a);
    if($_GET["if"] == $film[0]): ?>
 <img src = './img/<?php echo $film[1]; ?>'>
         
    <?php endif; ?>
   <?php endforeach; ?>
      

   

 <html>
  <body>    
<form action="edit.php" method="POST">
     <table>
 <tr><td><input type="text" size="30px;" value="<?php echo $film[2] ?>"></td></tr>
  <tr><td><input type="text" size="30px;" value="<?php echo $film[3] ?>"></td></tr>
  <tr><td> <input type="submit" value="Save" ></td</tr>
   <a href="file.php">Back</a>
  </table>
 </form>
</body>
 <html>
